From fe80230985b9c73515ad867cb49e3c7b769fa7de Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Thu, 7 Apr 2016 09:33:41 +0200 Subject: [PATCH] quartz: zoom/rotate change compile/runtime check from 10.7 to 10.8 The zoom/rotate change for quartz does not build on 10.7. This change adds zoom/rotate support in quartz only for 10.8 and following. The problems is described here: https://bugzilla.gnome.org/show_bug.cgi?id=760276 and here https://trac.macports.org/ticket/51052 NSEventPhaseMayBegin was only introduced in 10.8 although documentation says it is introduced in 10.7. Tests on 10.7 indicate that the phase property for the Magnify event is not supported at all on 10.7 --- gdk/quartz/gdkevents-quartz.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c index 749cc0211d..62094a8fc9 100644 --- a/gdk/quartz/gdkevents-quartz.c +++ b/gdk/quartz/gdkevents-quartz.c @@ -906,7 +906,7 @@ fill_crossing_event (GdkWindow *toplevel, such that PINCH(STARTED), PINCH(UPDATE).... will not show a second PINCH(STARTED) event. */ -#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER +#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER static void fill_pinch_event (GdkWindow *window, GdkEvent *event, @@ -1002,7 +1002,7 @@ fill_pinch_event (GdkWindow *window, } event->touchpad_pinch.scale = last_scale; } -#endif /* OSX Version >= 10.7 */ +#endif /* OSX Version >= 10.8 */ static void fill_button_event (GdkWindow *window, @@ -1647,11 +1647,12 @@ gdk_event_translate (GdkEvent *event, } } break; -#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER +#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER case NSEventTypeMagnify: case NSEventTypeRotate: /* Event handling requires [NSEvent phase] which was introduced in 10.7 */ - if (gdk_quartz_osx_version () >= GDK_OSX_LION) + /* However - Tests on 10.7 showed that phase property does not work */ + if (gdk_quartz_osx_version () >= GDK_OSX_MOUNTAIN_LION) fill_pinch_event (window, event, nsevent, x, y, x_root, y_root); else return_val = FALSE; -- 2.30.2